<template>
  <div id="app">
    <a-config-provider :locale="locale">
      <router-view />
    </a-config-provider>
  </div>
</template>

<script>
import cn from "ant-design-vue/lib/locale-provider/zh_CN";
export default {
  data() {
    return {
      locale: cn,
      notificationPopup: false, //推送小弹窗
    };
  },
  created() {
    this.$socket.init();
    // this.$socket.get((res) => {
    //   console.log("接收到的消息app:", res);
    //   this.$message.success("socket接收一条消息");
    // });
  },
  methods: {
    accept() {
      this.notificationPopup = false;
    },
    reject() {
      this.notificationPopup = false;
    },
  },
  beforeDestroy() {
    this.$socket.close();
  },
};
</script>

<style lang="stylus">
html, body, #app {
  height: 100%;
  /* user-select: auto */
  /* height 100% */
  margin: 0;
  padding: 0;
}
</style>
